package com.spvs.job.mapper;

import com.spvs.job.domain.EquipPatrolRecord;
import com.spvs.job.domain.EquipUpkeepRecord;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * 巡检记录Mapper接口
 *
 * @author supervision
 * @date 2024-06-09
 */
public interface EquipPatrolRecordMapper
{
    /**
     * 查询巡检记录
     *
     * @param id 巡检记录主键
     * @return 巡检记录
     */
    public EquipPatrolRecord selectEquipPatrolRecordById(Long id);

    public EquipPatrolRecord selectEquipPatrolRecordByPlanId(Long id);
    public EquipPatrolRecord selectEquipPatrolRecordByCode(@Param("code") Long code,
                                                           @Param("taskType") Integer taskType,
                                                           @Param("type") Integer type);

    /**
     * 查询巡检记录列表
     *
     * @param equipPatrolRecord 巡检记录
     * @return 巡检记录集合
     */
    public List<EquipPatrolRecord> selectEquipPatrolRecordList(EquipPatrolRecord equipPatrolRecord);

    /**
     * 新增巡检记录
     *
     * @param equipPatrolRecord 巡检记录
     * @return 结果
     */
    public int insertEquipPatrolRecord(EquipPatrolRecord equipPatrolRecord);

    /**
     * 修改巡检记录
     *
     * @param equipPatrolRecord 巡检记录
     * @return 结果
     */
    public int updateEquipPatrolRecord(EquipPatrolRecord equipPatrolRecord);

    /**
     * 删除巡检记录
     *
     * @param id 巡检记录主键
     * @return 结果
     */
    public int deleteEquipPatrolRecordById(Long id);

    /**
     * 批量删除巡检记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteEquipPatrolRecordByIds(Long[] ids);

    EquipUpkeepRecord selectEquipUpkeepRecordByCode(String equipmentCode);
}
